<template>
  <div class="filter-container">
    <el-input
      v-model="queryPram.title"
      placeholder="姓名"
      style="width:200px"
      class="filter-item"
      @keyup.enter.native="handleFilter"
    />
    <el-select
      v-model="queryPram.type"
      placeholder="语种"
      clearable
      class="filter-item"
      style="width:130px"
    >
      <el-option value="德">
       德
      </el-option>
      <el-option value="法">
       法
      </el-option>
      <el-option value="日">
       日
      </el-option>
      <el-option value="俄">
       俄
      </el-option>
    </el-select>
     <el-select
      v-model="queryPram.sex"
      placeholder="性别"
      clearable
      class="filter-item"
      style="width:130px"
    >
      <el-option
      
        value="男"
      >
       男
      </el-option>
      <el-option
      
        value="女"
      >
       女
      </el-option>
    </el-select>
     <el-select
      v-model="queryPram.patent"
      placeholder="民族"
      clearable
      class="filter-item"
      style="width:130px"
    >
      <el-option
        v-for="(item, index) of typeOptionsPatent"
        :key="index"
        :value="item.id"
      >
        {{ item.typename }}
      </el-option>
    </el-select>
    <el-button
      class="filter-item"
      type="primary"
      icon="el-icon-search"
      @click="handleFilter"
      style="margin-left:15px"
      >搜索</el-button
    >
    <el-button
      class="filter-item"
      type="primary"
      icon="el-icon-edit"
      @click="handleCreate"
      style="margin-left:15px"
      >新建</el-button
    >
  </div>
</template>

<script>
export default {
  name: "FilterSearch",
  data() {
    return {
      queryPram: {
        title: "",
        type: ""
      },
      typeOptionsPatent:[{typename:'汉族'}]
    };
  },
  props: {
    typeOptions: Array
  },
  methods: {
    handleFilter() {
      this.$emit("handleFilter", this.queryPram);
    },
    handleCreate() {
      this.$emit("handleCreate");
    }
  }
};
</script>

<style>
.filter-container {
  padding: 0px 20px 20px 0px;
}
.filter-item {
  margin-left: 15px;
}
</style>